import requests
from numpy.testing.print_coercion_tables import print_coercion_table

url='http://api.github.com/search/repositories'
url += '?q=language:python+sort:stars:>10000'
headers = {'Accept': 'application/vnd.github.v3+json'}
r = requests.get(url, headers=headers)
print(f"Status code: {r.status_code}")
response_dict = r.json()
print(f"Total repositories: {response_dict['total_count']}")
print(f"Completed repositories: {response_dict['incomplete_results']}")
repo_dicts = response_dict['items']
print(f"repositories count: {len(repo_dicts)}")

repo_dict=repo_dicts[0]
print(f"\nKeys:{len(repo_dict)}")
for key in sorted(repo_dict.keys()):
    print(f"{key}: {repo_dict[key]}")
